\rcube_spellchecker_googie

Spellchecking backend implementation to work with a Googiespell service

Summary

Methods
Properties
Constants
__construct()
languages()
check()
get_suggestions()
get_words()
error()
No public properties found
MAX_SUGGESTIONS
GOOGIE_HOST
No protected methods found
$lang
$error
$dictionary
$separator
N/A
No private methods found
$matches
$content
N/A

Constants

MAX_SUGGESTIONS

MAX_SUGGESTIONS = 10

GOOGIE_HOST

GOOGIE_HOST = 'https://spell.roundcube.net'

Properties

$lang

$lang

$error

$error

$dictionary

$dictionary

$separator

$separator

$matches

$matches

$content

$content

Methods

__construct()

__construct(mixed  $dict, mixed  $lang) : mixed

Default constructor

Parameters

mixed $dict
mixed $lang

Returns

mixed —

languages()

languages() : array

Return a list of languages supported by this backend

Returns

array —

Indexed list of language codes

check()

check(mixed  $text) : bool

Set content and check spelling

Parameters

mixed $text

Text content for spellchecking

Returns

bool —

True when no misspelling found, otherwise false

get_suggestions()

get_suggestions(mixed  $word) : array

Returns suggestions for the specified word

Parameters

mixed $word

The word

Returns

array —

Suggestions list

get_words()

get_words(mixed  $text = null) : array

Returns misspelled words

Parameters

mixed $text

The content for spellchecking. If empty content used for check() method will be used.

Returns

array —

List of misspelled words

error()

error() : string

Returns error message

Returns

string —

Error message